import 'package:qq_music/tools/Controller/Play/Sond.dart';

class PlayController {
  ////** 播放控制器 play
  ///  *
  ///  * @param [String] $songmid 试听id 通过这个参数获取vkey
  ///  * @param [String] $fileName 文件id
  ///  * @param [String] $type 文件类型 ape flac 320Kmp3 mp3 m4a
  ///  * @param [Function] $callBack 回调地址
  ///  * @param [Map<String, dynamic>] $parameter 请求参数
  ///  * @return void
  ///*/
  static void playSond(String songmid, String fileName, String type, Function callBack,
      {Map<String, dynamic> parameter}) async {
    Sond.play(songmid, fileName, type, callBack);
  }

  static void pauseSond(
    Function callBack,
    /* String url, Function callBack, {Map<String, dynamic> parameter} */
  ) async {
    Sond.pause(
      callBack, /* url, callBack */
    );
  }

  static void stopSond(
    Function callBack,
    /* String url, Function callBack, {Map<String, dynamic> parameter} */
  ) async {
    Sond.stopSond(
      callBack, /* url, callBack */
    );
  }

  static void resumeSond(
    Function callBack,
    /* String url, Function callBack, {Map<String, dynamic> parameter} */
  ) async {
    Sond.resume(
      callBack, /* url, callBack */
    );
  }

  static void sondPlaybackProgress(
    Function callBack,
    /* String url, Function callBack, {Map<String, dynamic> parameter} */
  ) async {
    Sond.getPlaybackProgress(callBack);
  }

  static void getTotalLength(
    Function callBack,
    /* String url, Function callBack, {Map<String, dynamic> parameter} */
  ) async {
    Sond.totalLength(callBack);
  }

  static void continuePlaying(
    int position,
    Function callBack,
    /* String url, Function callBack, {Map<String, dynamic> parameter} */
  ) async {
    Sond.continuePlaying(position, callBack);
  }
}
